package com.cskaoyan.controller;

import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.bean.vo.StorageVo;
import com.cskaoyan.service.MarketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RequestMapping("/wx/storage")
@RestController
public class WXStorageController {
    @Autowired
    MarketService marketService;

    @RequestMapping("/upload")
    public BaseRespVo upload(@RequestBody MultipartFile file) {
        StorageVo storageVo = marketService.addCreateService(file);
        return BaseRespVo.success(storageVo);
    }
}
